<?php
header ( 'content-type:text/html; charset=utf-8' );

session_start();

@$userid = $_SESSION['userid'];

if (empty($userid)){
	die(json_encode(array('status'=>false,'info'=>'tips：操作超时　请重新登录')));
}

require 'lib/db.php';

@$user = dbselect('select money from user where id=:id',array('id'=>$userid));

if (empty($user)){
	die(json_encode(array('status'=>false,'info'=>'查询失败')));
}

echo json_encode(array('status'=>true,'money'=>$user['money']));